﻿@model IEnumerable<FantasyBlog.DAL.Category>
@{
    Layout = "~/Views/Shared/_CPLayout.cshtml";
}

<div id="icon-edit" class="icon32 icon32-posts-post">
    <br />
</div>
<h2>分类目录 </h2>
<h4><a href="adminpost/CreateCategory" class="add-new-h2">创建新分类</a></h4>

<table class="wp-list-table widefat fixed posts" cellspacing="0">
    <thead>
        <tr>
            <th scope='col' id='cb' class='manage-column column-cb check-column' style="">
            </th>
            <th scope='col' id='title' class='manage-column column-title sortable desc' style="">
                <span>分类名称</span>
            </th>
            <th scope='col' id='author' class='manage-column column-author sortable desc' style="">
                <span>文章</span>
            </th>
        </tr>
    </thead>
    <tfoot>
        <tr>
            <th scope='col' id='cb' class='manage-column column-cb check-column' style="">
            </th>
            <th scope='col' id='title' class='manage-column column-title sortable desc' style="">
                <span>分类名称</span>
            </th>
            <th scope='col' id='author' class='manage-column column-author sortable desc' style="">
                <span>文章</span>
            </th>
        </tr>
    </tfoot>
    <tbody id="the-list">
        @foreach (var item in Model)
        {
            <tr id='post-6' class='alternate author-self status-publish format-default iedit'
                valign="top">
                <th scope="row" class="check-column">
                </th>
                <td class="post-title page-title column-title">
                    <strong><a class="row-title" href="/adminpost/editCategory/@Html.DisplayFor(modelitem => item.ID)" title="编辑“@Html.DisplayFor(modelitem => item.name)”">@Html.DisplayFor(modelitem => item.name)</a></strong>
                    <div class="row-actions">
                        <span class='edit'><a href="/adminpost/editCategory/@Html.DisplayFor(modelitem => item.ID)" title="编辑此项目">
                            编辑</a> | </span><span class='view'><a href="/adminpost/editCategory/@Html.DisplayFor(modelitem => item.ID)" title="查看“@Html.DisplayFor(modelitem => item.name)”" rel="permalink">
                                查看</a></span>
                    </div>
                </td>
                <td class="categories column-categories">
                    <a>@item.Posts.Count</a>
                </td>
            </tr>
        }
    </tbody>
</table>
